package com.inspur.demo.controller;

import com.inspur.demo.feign.FeignTestClient1;
import com.inspur.demo.feign.FeignTestClient2;
import com.inspur.demo.feign.FeignTestClient3;
import com.inspur.demo.feign.FeignTestClient4;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignTest1Controller {

    @Autowired
    private FeignTestClient1 feignTestClient1;

    @Autowired
    private FeignTestClient2 feignTestClient2;

    @Autowired
    private FeignTestClient3 feignTestClient3;

    @Autowired
    private FeignTestClient4 feignTestClient4;

    @GetMapping("/feignTest1/get/{id}")
    public String get1(@PathVariable String id) {
        return feignTestClient1.get(id);
    }

    @GetMapping("/feignTest2/get/{id}")
    public String get2(@PathVariable String id) {
        return feignTestClient2.get(id);
    }

    @GetMapping("/feignTest3/get/{id}")
    public String get3(@PathVariable String id) {
        return feignTestClient3.get(id);
    }

    @GetMapping("/feignTest4/get/{id}")
    public String get4(@PathVariable String id) {
        return feignTestClient4.get(id);
    }
}
